package com.ym.manager.admin.goods;

import com.ym.base.BaseDao;
import com.ym.manager.admin.goods.model.GoodsCategory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface GoodsCategoryDao extends BaseDao {
    int deleteByPrimaryKey(Integer id);

    int insert(GoodsCategory record);

    int insertSelective(GoodsCategory record);

    GoodsCategory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(GoodsCategory record);

    int updateByPrimaryKey(GoodsCategory record);

    //查询总条数
    int getCategoryListCount(Map<String,Object> map);
    //类目列表数
    List<GoodsCategory> getCategoryList(@Param("pid") int pid);

    //根据pid获取类目信息
    GoodsCategory detailByPid(int categoryId);
    //获取一级类目佣金
    Map<String,Object> getRate(@Param("hospital_id") int hospital_id,@Param("categoryPid") int categoryPid);
}